package com.example.lib_common.util;

public class MileageUtils {

    public static String meterToKilometers(int meters) {
        if (meters > 0) {
            if (meters < 1000) {
                return meters + "米";
            }
            return  meters/1000 +"."+ meters%1000 + "公里";
        }
        return "0米";
    }

    public static String meterToKilometersWithoutUnit(int meters) {
        if (meters > 0) {
            if (meters < 1000) {
                return meters+"";
            }
            return  meters/1000 +"."+ meters%1000;
        }
        return "0";
    }

}